Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Editing Ellipsoids

QuickDraw 3D provides routines that you can use to create and manipulate ellipsoids. See "Ellipsoids" for the definition of an ellipsoid.

Q3Ellipsoid_New

You can use the Q3Ellipsoid_New function to create a new ellipsoid.

TQ3GeometryObject Q3Ellipsoid_New (
                     const TQ3EllipsoidData *ellipsoidData);
ellipsoidData
A pointer to a TQ3EllipsoidData structure.

DESCRIPTION

The Q3Ellipsoid_New function returns, as its function result, a new ellipsoid having the shape and attributes specified by the ellipsoidData parameter. If a new ellipsoid could not be created, Q3Ellipsoid_New returns the value NULL .

Q3Ellipsoid_Submit

You can use the Q3Ellipsoid_Submit function to submit an immediate ellipsoid for drawing, picking, bounding, or writing.

TQ3Status Q3Ellipsoid_Submit (
                     const TQ3EllipsoidData *ellipsoidData,
                     TQ3ViewObject view);
ellipsoidData
A pointer to a TQ3EllipsoidData structure.
view
A view.

DESCRIPTION

The Q3Ellipsoid_Submit function submits for drawing, picking, bounding, or writing the immediate ellipsoid whose shape and attribute set are specified by the ellipsoidData parameter. The ellipsoid is drawn, picked, bounded, or written according to the view characteristics specified in the view parameter.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.

Q3Ellipsoid_GetData

You can use the Q3Ellipsoid_GetData function to get the data that defines an ellipsoid and its attributes.

TQ3Status Q3Ellipsoid_GetData (
                     TQ3GeometryObject ellipsoid,
                     TQ3EllipsoidData *ellipsoidData);
ellipsoid
An ellipsoid.
ellipsoidData
On exit, a pointer to a TQ3EllipsoidData structure that contains information about the ellipsoid specified by the ellipsoid parameter.

DESCRIPTION

The Q3Ellipsoid_GetData function returns, through the ellipsoidData parameter, information about the ellipsoid specified by the ellipsoid parameter. QuickDraw 3D allocates memory for the TQ3EllipsoidData structure internally; you must call Q3Ellipsoid_EmptyData to dispose of that memory.

Q3Ellipsoid_SetData

You can use the Q3Ellipsoid_SetData function to set the data that defines an ellipsoid and its attributes.

TQ3Status Q3Ellipsoid_SetData (
                     TQ3GeometryObject ellipsoid,
                     const TQ3EllipsoidData *ellipsoidData);
ellipsoid
An ellipsoid.
ellipsoidData
A pointer to a TQ3EllipsoidData structure.

DESCRIPTION

The Q3Ellipsoid_SetData function sets the data associated with the ellipsoid specified by the ellipsoid parameter to the data specified by the ellipsoidData parameter.

Q3Ellipsoid_EmptyData

You can use the Q3Ellipsoid_EmptyData function to release the memory occupied by the data structure returned by a previous call to Q3Ellipsoid_GetData .

TQ3Status Q3Ellipsoid_EmptyData (TQ3EllipsoidData *ellipsoidData);
ellipsoidData
A pointer to a TQ3EllipsoidData structure.

DESCRIPTION

The Q3Ellipsoid_EmptyData function releases the memory occupied by the TQ3EllipsoidData structure pointed to by the ellipsoidData parameter; that memory was allocated by a previous call to Q3Ellipsoid_GetData .

Q3Ellipsoid_GetOrigin

You can use the Q3Ellipsoid_GetOrigin function to get the origin of an ellipsoid.

TQ3Status Q3Ellipsoid_GetOrigin (
                     TQ3GeometryObject ellipsoid,
                     TQ3Point3D *origin);
ellipsoid
An ellipsoid.
origin
On exit, the origin of the specified ellipsoid.

DESCRIPTION

The Q3Ellipsoid_GetOrigin function returns, in the origin parameter, the origin of the ellipsoid specified by the ellipsoid parameter.

Q3Ellipsoid_SetOrigin

You can use the Q3Ellipsoid_SetOrigin function to set the origin of an ellipsoid.

TQ3Status Q3Ellipsoid_SetOrigin (
                     TQ3GeometryObject ellipsoid,
                     const TQ3Point3D *origin);
ellipsoid
An ellipsoid.
origin
The desired origin of the specified ellipsoid.

DESCRIPTION

The Q3Ellipsoid_SetOrigin function sets the origin of the ellipsoid specified by the ellipsoid parameter to that specified in the origin parameter.

Q3Ellipsoid_GetOrientation

You can use the Q3Ellipsoid_GetOrientation function to get the orientation of an ellipsoid.

TQ3Status Q3Ellipsoid_GetOrientation (
                     TQ3GeometryObject ellipsoid,
                     TQ3Vector3D *orientation);
ellipsoid
An ellipsoid.
orientation
On exit, the orientation of the specified ellipsoid.

DESCRIPTION

The Q3Ellipsoid_GetOrientation function returns, in the orientation parameter, the orientation of the ellipsoid specified by the ellipsoid parameter.

Q3Ellipsoid_SetOrientation

You can use the Q3Ellipsoid_SetOrientation function to set the orientation of an ellipsoid.

TQ3Status Q3Ellipsoid_SetOrientation (
                     TQ3GeometryObject ellipsoid,
                     const TQ3Vector3D *orientation);
ellipsoid
An ellipsoid.
orientation
The desired orientation of the specified ellipsoid.

DESCRIPTION

The Q3Ellipsoid_SetOrientation function sets the orientation of the ellipsoid specified by the ellipsoid parameter to that specified in the orientation parameter.

Q3Ellipsoid_GetMajorRadius

You can use the Q3Ellipsoid_GetMajorRadius function to get the major radius of an ellipsoid.

TQ3Status Q3Ellipsoid_GetMajorRadius (
                     TQ3GeometryObject ellipsoid,
                     TQ3Vector3D *majorRadius);
ellipsoid
An ellipsoid.
majorRadius
On exit, the major radius of the specified ellipsoid.

DESCRIPTION

The Q3Ellipsoid_GetMajorRadius function returns, in the majorRadius parameter, the major radius of the ellipsoid specified by the ellipsoid parameter.

Q3Ellipsoid_SetMajorRadius

You can use the Q3Ellipsoid_SetMajorRadius function to set the major radius of an ellipsoid.

TQ3Status Q3Ellipsoid_SetMajorRadius (
                     TQ3GeometryObject ellipsoid,
                     const TQ3Vector3D *majorRadius);
ellipsoid
An ellipsoid.
majorRadius
The desired major radius of the specified ellipsoid.

DESCRIPTION

The Q3Ellipsoid_SetMajorRadius function sets the major radius of the ellipsoid specified by the ellipsoid parameter to that specified in the majorRadius parameter.

Q3Ellipsoid_GetMinorRadius

You can use the Q3Ellipsoid_GetMinorRadius function to get the minor radius of an ellipsoid.

TQ3Status Q3Ellipsoid_GetMinorRadius (
                     TQ3GeometryObject ellipsoid,
                     TQ3Vector3D *minorRadius);
ellipsoid
An ellipsoid.
minorRadius
On exit, the minor radius of the specified ellipsoid.

DESCRIPTION

The Q3Ellipsoid_GetMinorRadius function returns, in the minorRadius parameter, the minor radius of the ellipsoid specified by the ellipsoid parameter.

Q3Ellipsoid_SetMinorRadius

You can use the Q3Ellipsoid_SetMinorRadius function to set the minor radius of an ellipsoid.

TQ3Status Q3Ellipsoid_SetMinorRadius (
                     TQ3GeometryObject ellipsoid,
                     const TQ3Vector3D *minorRadius);
ellipsoid
An ellipsoid.
minorRadius
The desired minor radius of the specified ellipsoid.

DESCRIPTION

The Q3Ellipsoid_SetMinorRadius function sets the minor radius of the ellipsoid specified by the ellipsoid parameter to that specified in the minorRadius parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |